<!--
 * @Author: lihaogn
 * @Date: 2021-12-15 09:36:44
 * @LastEditTime: 2022-01-19 17:57:27
 * @LastEditor: lihaogn
 * @Description: 基本的 dialog 模板
 * @FilePath: \lix-admin-vue2\src\views\develop\template\DialogBasicTemplate.vue
-->
<template>
  <el-dialog
    :close-on-click-modal="false"
    :title="title"
    :visible.sync="dialogVisible"
    width="420px"
    @close="handleDialogCancel"
  >
    这是一个基础的对话框

    <span slot="footer">
      <el-button @click="dialogVisible = false">取 消</el-button>
      <el-button
        type="primary"
        @click="handleDialogOk"
        :loading="okButtonLoading"
        >确 定</el-button
      >
    </span>
  </el-dialog>
</template>

<script>
import { dialogMixin } from '../../../mixins/dialog'
export default {
  mixins: [dialogMixin],
  data() {
    return {}
  },
  methods: {
    handleDialogCancel() {
      this.$emit('update:visible', false)
    },
    handleDialogOk() {
      this.dialogVisible = false
      this.$emit('ok')
    }
  }
}
</script>

<style lang="less" scoped></style>
